Another part of Grammar is Independent clauses. Independent clauses are complete thoughts. "She was in Trouble." Is an independent clause. It expresses a complete thought and it doesn't need anything added to it to make it a complete sentence.

The dependent clause: "Because of what she did...." can be a combined using a comma with the independent clause "She was in trouble." making the sentence "Because of what she did,she was in trouble."

Tip: A good way to combine independent clauses is by using Coordinating conjunctions a.k.a fanboys. An example like "Samm is very beautiful, *And* She makes me happy." *And* being the fanboy. The fanboy *And* helped combine the two independent clauses "Samm is very beautiful." and "She makes me happy." Other fanboys include "But,for,nor,so,or,yet".

Sites used:
http://owl.english.purdue.edu/owl/resource/598/1/